<template>
  <div class="box">
    <h2>Child1组件</h2>
    <span>展示: {{ add }}</span>
    <br /><br />
    <button @click="$emit('update:add', add + 1)">按钮</button>
  </div>
</template>

<script>
export default {
  name: 'Child1',
  // 子组件使用props来接收
  props: ['add']
}
</script>

<style scoped></style>
